%  This file is part of Erlywog.

%  Erlywog is free software: you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation, either version 3 of the License, or
%  (at your option) any later version.

%  Erlywog is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.

%  You should have received a copy of the GNU General Public License
%  along with Erlywog.  If not, see <http://www.gnu.org/licenses/>.

%  Copyright Jasm Sison 2009

%% Debug tools (L, Debug, Info, Warn, Error)
-define(L(Msg), io:format("~p:~b ~p ~n", [?MODULE, ?LINE, Msg])).
-define(Debug(Msg, Params),
	bloggo_util:log(?MODULE, ?LINE, debug, fun() -> {Msg, Params} end)).
-define(Info(Msg, Params),
 	bloggo_util:log(?MODULE, ?LINE, info, fun() -> {Msg, Params} end)).
-define(Warn(Msg, Params),
 	bloggo_util:log(?MODULE, ?LINE, warn, fun() -> {Msg, Params} end)).
-define(Error(Msg, Params),
 	bloggo_util:log(?MODULE, ?LINE, error, fun() -> {Msg, Params} end)).

%% Authentication record
-record(session, {key, value}).

%% Application settings
-define(MIN_PASSWORD_LENGTH, 8).    %% both
-define(DEFAULT_KEY_SIZE, 20).      %% both
-define(MAX_NR_OF_ENTRIES, 6).      %% blog
-define(MAX_NR_OF_TABLE_ROWS, 10).  %% editor



